package d0324;

import java.util.Arrays;

public class StudentSort {

    public static void main(String[] args) {
        Student s1=new Student("AAA",12,1);
        Student s2=new Student("BBB",15,2);
        Student s3=new Student("CCC",14,3);
        Student s4=new Student("DDD",11,4);
        Student[]student=new Student[]{s1,s2,s3,s4};

        Arrays.sort(student,new StudentAgeComparator ());

        for(Student a:student){
            System.out.println(a);
        }
    }
}
